package com.study.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

/**
 * @Author chenyeqing
 * @Date 2021/11/13 14:46
 */
@Aspect
@Component
public class MyAspect {

    @Around("execution(* com.study.aop..*(..))")
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("额外功能");
        Object proceed = joinPoint.proceed();
        return proceed;
    }
}
